<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

<div id="page-title">

    <h3>
        <#if bankmaintain>修改银行维护<#else>添加银行维护</#if>
    </h3>
 
</div>
<div class="pad10A">
<#if bankmaintain> 
<form id="demo-form1" action="/bankmaintain/update/${bankmaintain.id}" class="col-md-12" method="POST">
<#else>
<form id="demo-form1" action="/bankmaintain/add" class="col-md-12" method="POST">
</#if>

	<#if bankmaintain>
	<input type="hidden" name="id" value="${bankmaintain.id}"/>
	</#if>
	
	<div class="form-row">
	    <div class="form-label col-md-2">
	        <label for="">
	            开始日期:
	            <span class="required">*</span>
	        </label>
	    </div>
	    <div class="form-input col-md-2">
	        <input type="text" name="startDate" data-trigger="focus" data-required="true" class="parsley-validated"
	               value="${bankmaintain.startDate}"
	               onClick="WdatePicker({isShowWeek:true,dateFmt:'yyyy-MM-dd'})"
	               style="clear:both;overflow:hidden;display:block">
	    </div>
	</div>
	
	<div class="form-row">
	    <div class="form-label col-md-2">
	        <label for="">
	            开始时间:
	            <span class="required">*</span>
	        </label>
	    </div>
	    <div class="form-input col-md-2">
	        <input type="text" name="startTime" data-trigger="focus" data-required="true" class="parsley-validated"
	               value="${bankmaintain.startTime}"
	               onClick="WdatePicker({isShowWeek:true,dateFmt:'HH:mm'})"
	               style="clear:both;overflow:hidden;display:block">
	    </div>
	</div>
	
	<div class="form-row">
	    <div class="form-label col-md-2">
	        <label for="">
	            结束时间:
	            <span class="required">*</span>
	        </label>
	    </div>
	    <div class="form-input col-md-2">
	        <input type="text" name="endTime" data-trigger="focus" data-required="true" class="parsley-validated"
	               value="${bankmaintain.endTime}"
	               onClick="WdatePicker({isShowWeek:true,dateFmt:'HH:mm'})"
	               style="clear:both;overflow:hidden;display:block">
	    </div>
	</div>
	
   <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                重复次数:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-8">
             <div class="form-checkbox-radio col-md-10">
                            <input type="radio" name="repeattimes" value="one" id="repeattimes"  <#if bankmaintain.repeattimes != 'every' >checked="" </#if>/>
                            <label for="">一天</label>

                            <input type="radio" name="repeattimes" value="every" id="repeattimes" <#if bankmaintain.repeattimes == 'every' >checked="" </#if>/>
                            <label for="">每天</label>
             </div>
        </div>
   </div>
	
   <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                银行名称:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-5">
        <select name="bankCode">
            <#list banklist as bank>
        		<option value="${bank.bankCode}" <#if bankmaintain.bankCode == '${bank.bankCode}'>selected</#if>>${bank.bankName}</option>
        	</#list>
        	</select>
        </div>
    </div>
    
    <div class="divider"></div>
    <div class="form-row">
        <input type="hidden" name="superhidden" id="superhidden">
       <div class="form-input col-md-10 col-md-offset-2">
                    <a href="javascript:;" class="btn medium primary-bg radius-all-4 col-md-2" id="demo-form-2-valid">提交</a>
        </div>
    </div>   

</form>
</div>
</div>


<script type="text/javascript">
$(function(){
    
	$("#demo-form-2-valid").click(function(){
		$('#demo-form1').parsley('validate');
	    $('#demo-form1').trigger('submit');
	});
});
</script>